<?php if($data):?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>南京大学“拔尖计划”教学酬金申报表</title>
<object id="WebBrowser" classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height="0" width="0">
</object>
<style type="text/css">
body {
	margin-left: 5px;
	margin-right: 5px;
	margin-top: 10px;
	margin-bottom: 10px;
}
.style4 {
	color: #CC0000
}
.style5 {
	font-size: 14px;
	color: #CC0000;
}
.style6 {
	font-size: 16px;
}
.STYLE7 {
	color: #000000
}
.1 {
	width:50px;
	height:21px;
	padding:2px;
	text-align: center;
	vertical-align: middle;
}
.2 {
	text-align:left;
	vertical-align:middle;
	height:25px;
	padding:2px;
}
.3 {
	text-align:center;
	vertical-align:middle;
	height:21px;
}
#form1 table tr {
	background-color:#FFFFFF;
}
.4 {
	width:723px;
	margin-right: auto;
	margin-left: auto;
	text-align:left;
}
-->
</style>
<style media=print>
.Noprint {
	display:none;
}
<!--
用本样式在打印时隐藏非打印项目-->
</style>
<style>
.PageNext {
	page-break-before: auto;
	page-break-after: always;
}
<!--
控制分页--> .style8 {
	font-size: medium;
	color: #000066;
}
</style>
</head><script language="javascript"> 
function printsetup(){ 

		document.all.WebBrowser.execwb(8,1); 
} 
	function printpreview(){ 
	// 打印页面预览 
	var mStr1,mStr2,mStr3;   
	mStr1 = document.body.innerHTML ;  
	mStr2= mStr1; 
	mStr3= mStr1;
	var mWindow = window; 
	
	
	mWindow.document.body.innerHTML=mStr2;
	var lian=mWindow.document.getElementById("lian");
	
	lian.innerHTML="<p>第二联</p>";
	
	lian.setAttribute("id","lian1");
	
	
	mStr2=mWindow.document.body.innerHTML;
	
	
	mWindow.document.body.innerHTML=mStr3;
	var lian=mWindow.document.getElementById("lian");
	
	lian.innerHTML="<p>第三联</p>";
	
	lian.setAttribute("id","lian2");
	
	
	mStr3=mWindow.document.body.innerHTML;
	
	mWindow.document.body.innerHTML=mStr1+mStr2+mStr3;
	
	mWindow.document.all.WebBrowser.execwb(7,1);   
	window.document.body.innerHTML = mStr1;
	
	} 
	function printit() 
	{ 
	if (confirm("确定打印吗？")) {
		var mStr1,mStr2,mStr3;   
	mStr1 = document.body.innerHTML ;  
	mStr2= mStr1; 
	mStr3= mStr1;
	var mWindow = window; 
	
	
	mWindow.document.body.innerHTML=mStr2;
	var lian=mWindow.document.getElementById("lian");
	
	lian.innerHTML="<p>第二联</p>";
	
	lian.setAttribute("id","lian1");
	
	
	mStr2=mWindow.document.body.innerHTML;
	
	
	mWindow.document.body.innerHTML=mStr3;
	var lian=mWindow.document.getElementById("lian");
	
	lian.innerHTML="<p>第三联</p>";
	
	lian.setAttribute("id","lian2");
	
	
	mStr3=mWindow.document.body.innerHTML;
	
	mWindow.document.body.innerHTML=mStr1+mStr2+mStr3;
		
		mWindow.document.all.WebBrowser.execwb(6,6);   
		window.document.body.innerHTML = mStr1;			
	} 
} 
</script>
<body>
<div class="PageNext">
  <div align="center">
    <h2 class="style4">南京大学"拔尖计划"教学酬金申报表<?php if($data['type'] ==1 ) echo "（校内专家）"?></h2>
    <form id="form1" name="form1" method="post" action="">
      <input class="Noprint" type=button name=button_print value="打印" class="noprint" onclick="javascript:printit()">
      <input class="Noprint" type=button name=button_setup value="打印页面设置" class="noprint" onclick="javascript:printsetup();">
      <input class="Noprint" type=button name=button_show value="打印预览" class="noprint" onclick="javascript:printpreview();">
      <table width="800" border="0" cellpadding="5">
        <tr>
          <td><table width="800" border="1" align="center" cellpadding="5" cellspacing="1" bgcolor="#000000">
              <!--DWLayoutTable-->
              <tr>
                <td class="2" colspan="2"><span class="STYLE7 STYLE7">经费卡号：</span></td>
                <td class="2" colspan="2"></td>
                <td class="2" colspan="2"><span class="font_foot STYLE7 STYLE7">学年学期： </span></td>
                <td class="2" colspan="5"></td>
              </tr>
              <tr>
                <td class="2" nowrap="nowrap" colspan="2"><span class="font_foot STYLE7">院系单位：</span></td>
                <td class="2" colspan="2"><?php echo getInstitute($data['department'])?></td>
                <td class="2"  nowrap="nowrap" colspan="2"><span class="font_foot STYLE7">发放月份：</span></td>
                <td class="2" colspan="7">&nbsp;&nbsp;&nbsp;<?php echo $data['year'];?>&nbsp;年&nbsp;&nbsp;<?php echo $data['month'];?>&nbsp;月</td>
              </tr>
              <tr>
                <td width="27" height="21" class="3"><span class="font_foot STYLE7">序号</span></td>
                <td width="54" height="21" class="3"><span class="font_foot STYLE7">姓名</span></td>
                <td width="74" height="21" class="3"><span class="font_foot STYLE7"><?php echo ($data['type']==1)?"工资号":"证件号"?></span></td>
                <td width="112" height="21" class="3"><span class="font_foot STYLE7">课程名称</span></td>
                <td class="1"><span class="font_foot STYLE7">周课时</span></td>
                <td class="1"><span class="font_foot STYLE7">上课周数</span></td>
                <td class="1"><span class="font_foot STYLE7">本月总课时</span></td>
                <td class="1"><span class="font_foot STYLE7">课时酬金标准</span></td>
                <td  class="1"><span class="font_foot STYLE7">税前金额</span></td>
                <td  class="1"><span class="font_foot STYLE7">个人所得税</span></td>
                <td  class="1"><span class="font_foot STYLE7">税后金额</span></td>
              </tr>
              <?php 
              $i = 1;
              $preTotalRMB = 0;
              $preTotalUSD = 0;
              if(count($data['items'])>0):?>
              	<?php foreach($data['items'] as $course):?>
              <tr>
                <td width="27" height="21" class="3"><span class="font_foot STYLE7"><?php echo $i;?></span></td>
                <td width="54" height="21" class="3"><?php echo $course->teacherName;?></td>
                <td width="74" height="21" class="3"><?php echo $course->credential;?></td>
                <td width="112" height="21" class="3"><?php echo $course->courseName;?></td>
                <td class="1"><?php echo $course->unit;?></td>
                <td class="1"><?php echo $course->weekCount;?></td>
                <td class="1"><?php echo $course->monthUnit;?></td>
                <td class="1"><?php echo $course->salaryStandard.$course->getSalaryStandardAttr()?></td>
                <td  class="1"><?php echo $course->preSalary.$course->getSalaryFixAttr();?></td>
                <td  class="1"></td>
                <td  class="1"></td>
              </tr>
              <?php 
              $i++;
              if($course->salaryFix == CourseBean::$YUAN_PER_HOUR ||$course->salaryFix == CourseBean::$YUAN_PER_MONTH || $course->salaryFix == CourseBean::$YUAN_PER_TIME )
              	$preTotalRMB+=$course->preSalary;
              else
              	$preTotalUSD+=$course->preSalary;
              
              ?>
              <?php endforeach;?>
              <?php endif;?>
              <tr>
                <td  class="3" colspan="8"><span class="font_foot STYLE7">合计</span></td>
                <td  class="1"><?php if($preTotalRMB!=0) echo $preTotalRMB."元 </br>"; if($preTotalUSD!=0) echo $preTotalUSD."美元";?></td>
                <td  class="1"></td>
                <td  class="1"></td>
              </tr>
              <tr>
                <td  class="3" colspan="11" align="left"><span class="font_foot STYLE7">支出（税前）合计大写</span></td>
              </tr>
            </table></td>
          <td><div style="WRITING-MODE: lr-tb" id="lian">
              <p>第一联院系联</p>
            </div></td>
        </tr>
      </table>
    </form>
    <div class="4">
      <p><span class="STYLE7">院系经手人：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;院系负责人：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;教务处负责任审核：</span></p>
    </div>
    
    <div class="4">
      <p><span class="STYLE7">日期&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;月&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;单位公章&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;单位公章</span></p>
    </div>
  </div>
</div>
</body>
</html>
<?php endif;?>